// mock/user.bundled_1pjet95w2nx.mjs
var SUCCESS_MESSAGE = "\u63A5\u53E3\u8FDE\u63A5\u6B63\u5E38";
var ERROR_MESSAGE = "\u63A5\u53E3\u5F02\u5E38";
var userList = [
  {
    name: "admin",
    password: "admin",
    dept: 1,
    depaName: "\u7BA1\u7406\u5458",
    sex: "male",
    id: 1,
    token: "123456"
  },
  {
    name: "\u5F20\u4E09",
    password: "zs",
    dept: 2,
    depaName: "\u6D4B\u8BD5",
    sex: "male",
    id: 2,
    token: "123456"
  },
  {
    name: "\u674E\u56DB",
    password: "ls",
    dept: 2,
    depaName: "\u6D4B\u8BD5",
    sex: "male",
    id: 3,
    token: "123456"
  }
];
var user_default = [
  {
    url: "/api/login",
    method: "post",
    response: ({ body }) => {
      const { userName, password } = body;
      const userInfo = userList.find((item) => item.name === userName && item.password === password);
      if (!userInfo) {
        return { code: 201, data: {}, message: "\u7528\u6237\u540D\u6216\u5BC6\u7801\u9519\u8BEF" };
      }
      return { code: 200, data: userInfo, message: SUCCESS_MESSAGE };
    }
  },
  {
    url: "/api/getList",
    method: "post",
    response: (req) => {
      return {
        code: 200,
        data: userList
      };
    }
  },
  {
    url: "/api/getUserInfo",
    method: "get",
    response: ({ query }) => {
      const { id } = query.id;
      if (id) {
        const userInfo = userList.find((item) => item.id === id);
        if (userInfo) {
          return { code: 200, data: userInfo, message: SUCCESS_MESSAGE };
        }
        return { code: 201, data: {}, message: ERROR_MESSAGE };
      }
      return { code: 201, data: {}, message: ERROR_MESSAGE };
    }
  }
];
export {
  user_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibW9jay9tb2NrL3VzZXIuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9faW5qZWN0ZWRfZmlsZW5hbWVfXyA9IFwiRDpcXFxcXHU1MjREXHU3QUVGXFxcXHZ1ZTNfZGVtb1xcXFxteS12dWUzLXZpdGVcXFxcbW9ja1xcXF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AgICAgICByZXNwb25zZTogKHJlcSkgPT4ge1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgY29kZTogMjAwLFxyXG4gICAgICAgICAgICAgICAgZGF0YTogdXNlckxpc3RcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9LFxyXG4gICAgfSxcclxuICAgIHtcclxuICAgICAgICB1cmw6ICcvYXBpL2dldFVzZXJJbmZvJyxcclxuICAgICAgICBtZXRob2Q6ICdnZXQnLFxyXG4gICAgICAgIHJlc3BvbnNlOiAoeyBxdWVyeSB9KSA9PiB7XHJcblxyXG4gICAgICAgICAgICBjb25zdCB7IGlkIH0gPSBxdWVyeS5pZDtcclxuICAgICAgICAgICAgaWYgKGlkKSB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCB1c2VySW5mbyA9IHVzZXJMaXN0LmZpbmQoaXRlbSA9PiBpdGVtLmlkID09PSBpZCk7XHJcbiAgICAgICAgICAgICAgICBpZiAodXNlckluZm8pIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBjb2RlOiAyMDAsIGRhdGE6IHVzZXJJbmZvLCBtZXNzYWdlOiBTVUNDRVNTX01FU1NBR0UgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHsgY29kZTogMjAxLCBkYXRhOiB7fSwgbWVzc2FnZTogRVJST1JfTUVTU0FHRSB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgcmV0dXJuIHsgY29kZTogMjAxLCBkYXRhOiB7fSwgbWVzc2FnZTogRVJST1JfTUVTU0FHRSB9XHJcblxyXG4gICAgICAgIH0sXHJcbiAgICB9LFxyXG5dO1xyXG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQ0EsSUFBTSxrQkFBa0I7QUFDeEIsSUFBTSxnQkFBZ0I7QUFDdEIsSUFBTSxXQUFXO0VBQ2I7SUFDSSxNQUFNO0lBQ04sVUFBVTtJQUNWLE1BQ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